/**
 * Copyright (c) Software Institute of PKU
 * All rights reserved. 
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */
package edu.pku.sei.transformation.editor.views.figures;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.swt.graphics.Color;

import edu.pku.sei.modeler.figures.CommonFigure;

/**
 * @generated
 * 
 */
public class NotTemplateFigure extends CommonFigure implements ITemplateFigure {
	private Color foregroundColor = ColorConstants.black;
	private Color backgroundColor = ColorConstants.white;

	public IFigure root = null;

	private Label name = null;

	public NotTemplateFigure() {
		ToolbarLayout layout = new ToolbarLayout();
		layout.setVertical(true);
		this.setLayoutManager(layout);
		this.setBorder(new LineBorder(ColorConstants.buttonDarker, 1));

		name = new Label("{not}name");
		name.setForegroundColor(this.foregroundColor);
		name.setBackgroundColor(this.backgroundColor);
		name.setOpaque(true);
		this.add(name);

	}

	public void setHeadText(String text) {
		name.setText("{not} " + text);
	}

	@Override
	public Label getNameLabel() {
		return this.name;
	}
}
